package com.doyled.jump.framework;

import java.awt.Point;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;

public class GameMouseLocation {
	List<Point> mouseClickPositions;
	LinkedList<Point> mouseOverPositions;
	
	public GameMouseLocation(){
		mouseClickPositions = Collections.synchronizedList(new LinkedList<Point>());
		mouseOverPositions = new LinkedList<>();
	}
	
	public void addClickPostition(int x, int y){
		mouseClickPositions.add(new Point(x, y));
	}
	
	public Point getClickPosition(){
		if(mouseClickPositions.isEmpty()) return null;
		Point mouseClick = mouseClickPositions.get(0);
		mouseClickPositions.remove(0);
		return mouseClick;
	}
}
